﻿<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>南瓜灯</title>

<style>
* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
*:before, *:after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  background: #4c3d73;
  margin: 0;
  min-height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.container {
  position: relative;
  margin: 10px auto;
  width: 475px;
  height: 320px;
}

.pumpkin {
  position: absolute;
}
.pumpkin:after {
  position: absolute;
  content: '';
  z-index: -4;
  top: 95px;
  left: 20px;
  width: 435px;
  height: 220px;
  border-radius: 100%;
  -webkit-box-shadow: 0 15px 20px 15px #33294d;
  box-shadow: 0 15px 20px 15px #33294d;
}

.front {
  position: absolute;
  top: 29px;
  left: 127px;
  width: 220px;
  height: 290px;
  background: #ffaa4b;
  background: -webkit-gradient(linear, left bottom, left top, from(#f68e58), color-stop(15%, #ffaa4b));
  background: -webkit-linear-gradient(bottom, #f68e58 0%, #ffaa4b 15%);
  background: -o-linear-gradient(bottom, #f68e58 0%, #ffaa4b 15%);
  background: linear-gradient(to top, #f68e58 0%, #ffaa4b 15%);
  border: 4px solid #c66d52;
  border-radius: 45%;
}
.front:before {
  position: absolute;
  content: '';
  z-index: -1;
  left: -78px;
  bottom: 0;
  width: 220px;
  height: 290px;
  background: #ffaa4b;
  background: -webkit-gradient(linear, left bottom, left top, from(#f68e58), to(#ffaa4b));
  background: -webkit-linear-gradient(bottom, #f68e58 0%, #ffaa4b 100%);
  background: -o-linear-gradient(bottom, #f68e58 0%, #ffaa4b 100%);
  background: linear-gradient(to top, #f68e58 0%, #ffaa4b 100%);
  border: 4px solid #c66d52;
  border-radius: 45%;
}
.front:after {
  position: absolute;
  content: '';
  z-index: -1;
  left: 70px;
  bottom: 0;
  width: 220px;
  height: 290px;
  background: #ffaa4b;
  background: -webkit-gradient(linear, left bottom, left top, from(#f68e58), to(#ffaa4b));
  background: -webkit-linear-gradient(bottom, #f68e58 0%, #ffaa4b 100%);
  background: -o-linear-gradient(bottom, #f68e58 0%, #ffaa4b 100%);
  background: linear-gradient(to top, #f68e58 0%, #ffaa4b 100%);
  border: 4px solid #c66d52;
  border-radius: 45%;
}

.middle {
  position: absolute;
  z-index: -2;
  top: 15px;
  width: 220px;
  height: 290px;
  background: #f68e58;
  border: 4px solid #c66d52;
  border-radius: 45%;
}
.middle:after {
  position: absolute;
  content: '';
  z-index: -2;
  top: -4px;
  left: 250px;
  width: 220px;
  height: 290px;
  background: #f68e58;
  border: 4px solid #c66d52;
  border-radius: 45%;
}

.back {
  position: absolute;
  z-index: -3;
  top: 0;
  left: 50px;
  width: 220px;
  height: 290px;
  background: #f68e58;
  border: 4px solid #c66d52;
  border-radius: 45%;
}
.back:after {
  position: absolute;
  content: '';
  z-index: -3;
  top: -4px;
  left: 150px;
  width: 220px;
  height: 290px;
  background: #f68e58;
  border: 4px solid #c66d52;
  border-radius: 45%;
}

.eye, .mouth {
  background: #5e294c;
  background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), to(#5e294c));
  background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 100%);
  background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 100%);
  background: linear-gradient(to top, #7d364b 0%, #5e294c 100%);
  -webkit-box-shadow: 0 8px 0 0 #f8d89a;
  box-shadow: 0 8px 0 0 #f8d89a;
  -webkit-animation: glow 3s 3s infinite;
  animation: glow 3s 3s infinite;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.eye {
  position: absolute;
  top: 120px;
  left: 152px;
  width: 40px;
  height: 40px;
  border-radius: 100%;
}
.eye.right {
  top: 0;
  left: 130px;
}

.mouth {
  position: absolute;
  top: 190px;
  left: 147px;
  width: 180px;
  height: 60px;
  border-radius: 0% 0% 100% 100%;
}
.mouth:before {
  position: absolute;
  content: '';
  top: -15px;
  left: -1px;
  width: 182px;
  height: 30px;
  background: #ffaa4b;
  border-radius: 0% 0% 100% 100%;
}

.teeth {
  position: absolute;
  top: 10px;
  left: 34px;
  width: 30px;
  height: 20px;
  background: #ffaa4b;
}
.teeth.right {
  top: 0;
  left: 80px;
}
.teeth.bottom {
  top: 40px;
  left: 40px;
  height: 30px;
  -webkit-box-shadow: 0 -8px 0 0 #f8d89a;
  box-shadow: 0 -8px 0 0 #f8d89a;
}

.stem {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 207px;
  width: 60px;
  height: 50px;
  background: #84a44f;
  background: -webkit-gradient(linear, left bottom, left top, from(#84a44f), to(#a4d25a));
  background: -webkit-linear-gradient(bottom, #84a44f 0%, #a4d25a 100%);
  background: -o-linear-gradient(bottom, #84a44f 0%, #a4d25a 100%);
  background: linear-gradient(to top, #84a44f 0%, #a4d25a 100%);
  border: 4px solid #688448;
}

@-webkit-keyframes glow {
  0% {
    background: #5e294c;
  }
  50% {
    background: #fcf6b9;
  }
  55% {
    background: #fcf6b9;
  }
  80% {
    background: #5e294c;
  }
  81% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), color-stop(25%, #5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 25%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 25%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 25%);
  }
  82% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), color-stop(50%, #5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 50%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 50%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 50%);
  }
  82% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), color-stop(75%, #5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 75%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 75%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 75%);
  }
  100% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), to(#5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 100%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 100%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 100%);
  }
}
@keyframes glow {
  0% {
    background: #5e294c;
  }
  50% {
    background: #fcf6b9;
  }
  55% {
    background: #fcf6b9;
  }
  80% {
    background: #5e294c;
  }
  81% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), color-stop(25%, #5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 25%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 25%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 25%);
  }
  82% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), color-stop(50%, #5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 50%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 50%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 50%);
  }
  82% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), color-stop(75%, #5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 75%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 75%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 75%);
  }
  100% {
    background: -webkit-gradient(linear, left bottom, left top, from(#7d364b), to(#5e294c));
    background: -webkit-linear-gradient(bottom, #7d364b 0%, #5e294c 100%);
    background: -o-linear-gradient(bottom, #7d364b 0%, #5e294c 100%);
    background: linear-gradient(to top, #7d364b 0%, #5e294c 100%);
  }
}
</style>
</head>
<body>
<div class="container">
  <div class="pumpkin">
    <div class="front"></div>
    <div class="face">
      <div class="eye">
        <div class="eye right"></div>
      </div>
      <div class="mouth">
        <div class="teeth">
          <div class="teeth right"></div>
          <div class="teeth bottom"></div>
        </div>
      </div>
    </div>
    <div class="middle"></div>
    <div class="back"></div>
    <div class="stem"></div>
  </div>
</div>

</body>
</html>
